﻿@{
    Layout = "";
}

<!DOCTYPE html>

<html>
<head>
    <title>设备信息Equipment information</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <!-- VENDOR CSS -->
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/jquery/jquery-ui.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/bootstrap/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/bootstrap/bootstrap-datetimepicker.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/font-awesome/font-awesome.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/toastr/toastr.css">
    <link rel="stylesheet" type="text/css" href="~/Content/vendor/klorofil/main.css">
    <link rel="stylesheet" type="text/css" href="~/Content/aztech-style.css">

    <script type="text/javascript" src="~/Scripts/vendor/modernizr-2.6.2.js"></script>
</head>
<body>

    <form id="equipmentDetailForm" class="form-horizontal" v-if="isNotEmptyObject(equipment)">
        <div class="panel">
            <div class="panel-heading">
                <p class="panel-title">基本资料Basic information</p>
            </div>
            <div class="panel-body">
                <table class="table table-bordered table-condensed text-center">
                    <tbody>
                        <tr>
                            <td style="width:7%;"><label class="control-label">设备编号Equipment number</label></td>
                            <td style="width:18%;"><input id="equipmentCode" type="text" class="form-control" v-model="equipment.BaseInfo.Code" /></td>
                            <td style="width:7%;"><label class="control-label">设备名称Equipment name</label></td>
                            <td style="width:18%;">
                                <select id="equipmentName" class="form-control" v-model="equipment.BaseInfo.Name">
                                    <option v-for="(value, key, idx) in typeDictionary" v-bind:value="key">{{key}}</option>
                                </select>

                            </td>
                            <td style="width:7%;"><label class="control-label">设备型号Equipment model</label></td>
                            <td style="width:18%;"><input id="equipmentModel" type="text" class="form-control" v-model="equipment.BaseInfo.Model" /></td>
                            <td style="width:7%;"><label class="control-label">序列号serial number</label></td>
                            <td style="width:18%;"><input id="equipmentSn" type="text" class="form-control" v-model="equipment.BaseInfo.Sn" /></td>
                        </tr>
                        <tr>
                            <td><label class="control-label">生产厂商Manufacturer</label></td>
                            <td><input id="equipmentManufacturer" type="text" class="form-control" v-model="equipment.BaseInfo.Manufacturer" /></td>
                            <td><label class="control-label">固定资产fixed assets<br />编号number</label></td>
                            <td><input id="equipmentFixedAsset" type="text" class="form-control" v-model="equipment.BaseInfo.FixedAsset" /></td>
                            <td><label class="control-label">入厂日期Date of entry</label></td>
                            <td>
                                <div class="input-group input-group-sm">
                                    <input id="equipmentPurchaseDate" type="text" class="form-control azDatePicker" v-model="equipment.BaseInfo.PurchaseDate" />
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </td>
                            <td><label class="control-label">使用年限service life</label></td>
                            <td><input id="equipmentExpiredYear" type="number" class="form-control" v-model="equipment.BaseInfo.ExpiredYear" /></td>
                        </tr>
                        <tr>
                            <td><label class="control-label">设备状态Equipment status</label></td>
                            <td>
                                <select id="equipmentStatus" class="form-control" v-model="equipment.BaseInfo.Status">
                                    <option v-for="(value, key, idx) in statusDictionary" v-bind:value="value">{{key}}</option>
                                </select>
                            </td>
                            <td><label class="control-label">负责人person in charge</label></td>
                            <td><input id="equipmentAssignerInfo" type="text" class="form-control" v-model="equipment.AssignerInfo.NameChs" v-on:blur="GetAssingerInfo" /></td>
                            <td><label class="control-label">管理人administrator</label></td>
                            <td><input id="equipmentManagerInfo" type="text" class="form-control" v-model="equipment.ManagerInfo.NameChs" v-on:blur="GetManagerInfo" /></td>
                            <td><label class="control-label">所属客户Belonging customer</label></td>
                            <td><input id="equipmentClient" type="text" class="form-control" v-model="equipment.BaseInfo.Client" /></td>
                        </tr>
                        <tr>
                            <td><label class="control-label">使用场所Place of use</label></td>
                            <td><input id="equipmentFloor" type="text" class="form-control" v-model="equipment.BaseInfo.Floor" /></td>
                            <td><label class="control-label">检测结果detection result</label></td>
                            <td><input id="equipmentCheckResult" type="text" class="form-control" v-model="equipment.BaseInfo.CheckResult" /></td>
                            <td><label class="control-label">检测备注Test remarks</label></td>
                            <td colspan="3"><input id="equipmentCheckRemark" type="text" class="form-control" v-model="equipment.BaseInfo.CheckRemark" /></td>
                        </tr>
                        <tr>
                            <td><label class="control-label">使用型号Use model</label></td>
                            <td><input id="equipmentProductModel" type="text" class="form-control" v-model="equipment.BaseInfo.ProductModel" /></td>
                            <td><label class="control-label">操作系统operating system</label></td>
                            <td><input id="equipmentOperatingSystem" type="text" class="form-control" v-model="equipment.BaseInfo.OperatingSystem" /></td>
                            <td><label class="control-label">投资Investment</label></td>
                            <td><input id="equipmentInvestment" type="text" class="form-control" v-model="equipment.BaseInfo.Investment" /></td>
                            <td><label class="control-label">保修期限Date of Warranty</label></td>
                            <td>
                                <div class="input-group input-group-sm">
                                    <input id="equipmentWarrantyDate" type="text" class="form-control azDatePicker" v-model="equipment.BaseInfo.WarrantyDate" />
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <div class="panel-heading">
                <p class="panel-title">计量信息Measurement information</p>
            </div>
            <div class="panel-body">
                <table class="table table-bordered table-condensed text-center">
                    <tbody>
                        <tr>
                            <td style="width: 8%"><label class="control-label">需要校准Calibration required?</label></td>
                            <td style="width: 17%">
                                <select id="measureIsNeed" class="form-control" v-model="equipment.MeasureInfo.IsNeed">
                                    <option v-for="(value, key, idx) in isNeedDictionary" v-bind:value="value">{{key}}</option>
                                </select>
                            </td>
                            <td style="width: 8%"><label class="control-label">最后计量Final measurement<br />日期date</label></td>
                            <td style="width: 17%">
                                <div class="input-group input-group-sm">
                                    <input id="lastMeasureDate" type="text" class="form-control azDatePicker" v-model="equipment.MeasureInfo.LastMeasureDate" />
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </td>
                            <td style="width: 8%"><label class="control-label">计量类型Metering type</label></td>
                            <td style="width: 17%">
                                <select id="measureType" class="form-control" v-model="equipment.MeasureInfo.Type">
                                    <option v-for="(value, key, idx) in measureTypeDictionary" v-bind:value="key">{{key}}</option>
                                </select>
                            </td>
                            <td style="width: 8%"><label class="control-label">计量单位Metering type</label></td>
                            <td style="width: 17%"><input type="text" class="form-control" v-model="equipment.MeasureInfo.Unit" /></td>
                        </tr>
                        <tr>
                            <td><label class="control-label">计量周期Metering cycle</label></td>
                            <td>
                                <select id="measurePeriod" class="form-control" v-model="equipment.MeasureInfo.Period">
                                    <option v-for="(value, key, idx) in periodDaysDictionary" v-bind:value="value">{{key}}</option>
                                </select>
                            </td>
                            <td><label class="control-label">计量预警Measurement early warning</label></td>
                            <td>
                                <select id="measureWarning" class="form-control" v-model="equipment.MeasureInfo.Warning">
                                    <option v-for="(value, key, idx) in warnDaysDictionary" v-bind:value="value">{{key}}</option>
                                </select>
                            </td>
                            <td><label class="control-label">下次计量Next measurement<br />预警日期Alert date</label></td>
                            <td>
                                <div class="input-group input-group-sm">
                                    <input id="warnMeasureDate" type="text" class="form-control azDatePicker" v-model="equipment.MeasureInfo.WarnMeasureDate" />
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </td>
                            <td><label class="control-label">下次计量Next measurement<br />到期日期Due date</label></td>
                            <td>
                                <div class="input-group input-group-sm">
                                    <input id="nextMeasureDate" type="text" class="form-control azDatePicker" v-model="equipment.MeasureInfo.NextMeasureDate" />
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td><label class="control-label">计量参考Metrological reference<br />标准standard</label></td>
                            <td colspan="3"><input type="text" class="form-control" v-model="equipment.MeasureInfo.Reference" /></td>
                            <td><label class="control-label">最后计量Final measurement<br />报告编号report number</label></td>
                            <td colspan="3"><input type="text" class="form-control" v-model="equipment.MeasureInfo.LastMeasureFormRecordID" /></td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <div class="panel-heading">
                <p class="panel-title">保养信息Maintenance information</p>
            </div>
            <div class="panel-body">
                <table class="table table-bordered table-condensed text-center">
                    <tbody>
                        <tr>
                            <td style="width: 8%"><label class="control-label">需要保养Maintenance required?</label></td>
                            <td style="width: 17%">
                                <select id="maintainIsNeed" class="form-control" v-model="equipment.MaintainInfo.IsNeed">
                                    <option v-for="(value, key, idx) in isNeedDictionary" v-bind:value="value">{{key}}</option>
                                </select>
                            </td>
                            <td style="width: 8%"><label class="control-label">最后保养Final maintenance<br />日期date</label></td>
                            <td style="width: 17%">
                                <div class="input-group input-group-sm">
                                    <input id="lastMaintainDate" type="text" class="form-control azDatePicker" v-model="equipment.MaintainInfo.LastMaintainDate" />
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </td>
                            <td style="width: 8%"><label class="control-label">保养类型Maintenance type</label></td>
                            <td style="width: 17%">
                                <select id="maintainType" class="form-control" v-model="equipment.MaintainInfo.Type">
                                    <option v-for="(value, key, idx) in maintainTypeDictionary" v-bind:value="key">{{key}}</option>
                                </select>
                            </td>
                            <td style="width: 8%"><label class="control-label"></label></td>
                            <td style="width: 17%"></td>
                        </tr>
                        <tr>
                            <td><label class="control-label">保养周期Maintenance cycle</label></td>
                            <td>
                                <select id="maintainPeriod" class="form-control" v-model="equipment.MaintainInfo.Period">
                                    <option v-for="(value, key, idx) in periodDaysDictionary" v-bind:value="value">{{key}}</option>
                                </select>
                            </td>
                            <td><label class="control-label">保养预警Maintenance warning</label></td>
                            <td>
                                <select id="maintainWarning" class="form-control" v-model="equipment.MaintainInfo.Warning">
                                    <option v-for="(value, key, idx) in warnDaysDictionary" v-bind:value="value">{{key}}</option>
                                </select>
                            </td>
                            <td><label class="control-label">下次保养Next maintain<br />预警日期Alert date</label></td>
                            <td>
                                <div class="input-group input-group-sm">
                                    <input id="warnMaintainDate" type="text" class="form-control azDatePicker" v-model="equipment.MaintainInfo.WarnMaintainDate" />
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </td>
                            <td><label class="control-label">下次保养Next maintain<br />到期日期Due date</label></td>
                            <td>
                                <div class="input-group input-group-sm">
                                    <input id="nextMaintainDate" type="text" class="form-control azDatePicker" v-model="equipment.MaintainInfo.NextMaintainDate" />
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td><label class="control-label">最后保养Final maintenance<br />记录编号Record number</label></td>
                            <td><input type="text" class="form-control" v-model="equipment.MaintainInfo.LastMaintainFormRecordID" /></td>
                            <td colspan="6"></td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <div class="panel-heading">
                <p class="panel-title">MSA信息MSA information</p>
            </div>
            <div class="panel-body">
                <table class="table table-bordered table-condensed text-center">
                    <tbody>
                        <tr>
                            <td style="width: 8%"><label class="control-label">需要测量Need to measure<br />系统分析systems analysis?</label></td>
                            <td style="width: 17%">
                                <select id="msaIsNeed" class="form-control" v-model="equipment.MsaInfo.IsNeed">
                                    <option v-for="(value, key, idx) in isNeedDictionary" v-bind:value="value">{{key}}</option>
                                </select>
                            </td>
                            <td style="width: 8%"><label class="control-label">最后MSA Last MSA<br />日期date</label></td>
                            <td style="width: 17%">
                                <div class="input-group input-group-sm">
                                    <input id="lastMsaDate" type="text" class="form-control azDatePicker" v-model="equipment.MsaInfo.LastMsaDate" />
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </td>
                            <td style="width: 8%"><label class="control-label">MSA类型MSA type</label></td>
                            <td style="width: 17%">
                                <select id="msaType" class="form-control" v-model="equipment.MsaInfo.Type">
                                    <option v-for="(value, key, idx) in msaTypeDictionary" v-bind:value="key">{{key}}</option>
                                </select>
                            </td>
                            <td style="width: 8%"><label class="control-label"></label></td>
                            <td style="width: 17%"></td>
                        </tr>
                        <tr>
                            <td><label class="control-label">MSA周期MSA cycle</label></td>
                            <td>
                                <select id="msaPeriod" class="form-control" v-model="equipment.MsaInfo.Period">
                                    <option v-for="(value, key, idx) in periodDaysDictionary" v-bind:value="value">{{key}}</option>
                                </select>
                            </td>
                            <td><label class="control-label">MSA预警MSA warning</label></td>
                            <td>
                                <select id="msaWarning" class="form-control" v-model="equipment.MsaInfo.Warning">
                                    <option v-for="(value, key, idx) in warnDaysDictionary" v-bind:value="value">{{key}}</option>
                                </select>
                            </td>
                            <td><label class="control-label">下次MSA Next MSA<br />预警日期Alert date</label></td>
                            <td>
                                <div class="input-group input-group-sm">
                                    <input id="warnMsaDate" type="text" class="form-control azDatePicker" v-model="equipment.MsaInfo.WarnMsaDate" />
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </td>
                            <td><label class="control-label">下次MSA Next MSA<br />到期日期Due date</label></td>
                            <td>
                                <div class="input-group input-group-sm">
                                    <input id="nextMsaDate" type="text" class="form-control azDatePicker" v-model="equipment.MsaInfo.NextMsaDate" />
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td><label class="control-label">最后MSA Last MSA<br />报告编号report number</label></td>
                            <td><input type="text" class="form-control" v-model="equipment.MsaInfo.LastMsaFormRecordID" /></td>
                            <td colspan="6"></td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="form-group">
                <div class="col-sm12 text-center">
                    <input type="text" v-model="equipment.BaseInfo.ID" hidden />
                    <button v-if="isNewEquipment" class="btn btn-default" v-on:click="SaveEquipment($event)">保存preservation</button>
                    <button v-if="!isNewEquipment && !isEditMode" class="btn btn-default" v-on:click="EditEquipment($event)">编辑edit</button>
                    <button v-if="!isNewEquipment && isEditMode" class="btn btn-default" v-on:click="UpdateEquipment($event)">更新renew</button>
                    <button v-if="!isNewEquipment && isEditMode" class="btn btn-default" v-on:click="CancelEditEquipment($event)">取消cancel</button>
                </div>
            </div>
        </div>
    </form>


    <script type="text/javascript" src="~/Scripts/vendor/jquery/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/jquery/jquery.cookie.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/jquery/jquery.slimscroll.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/bootstrap/bootstrap.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/bootstrap/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/toastr/toastr.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/klorofil/klorofil-common.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/respond.min.js"></script>
    <script type="text/javascript" src="~/Scripts/vendor/vue/vue.min.js"></script>
    <script type="text/javascript" src="~/Scripts/aztech-global.js?v=@DateTime.Now.ToFileTimeUtc()"></script>
    <script type="text/javascript" src="~/Scripts/aztech-script.js?v=@DateTime.Now.ToFileTimeUtc()"></script>
    <script type="text/javascript" src="~/Scripts/pageJs/Equipment/Detail.js?v=@DateTime.Now.ToFileTimeUtc()"></script>
</body>
</html>
